There is a possibility to launch several instances of embedded XS2A on the same server using common datasource. We provide backward compatibility for 2 versions to have a possibility to upgrade version of each XS2A step by step. Below are the steps which are required to change version of XS2A instances with common database. It is a good point to have a separate test environment with the current backend version with the test database before changing the production environment.
-
Create the database backup.
-
Create the liquibase.properties file in
/consent-management/cms-db-schema/
with your DB configuration, for example:url=jdbc:postgresql://localhost/consent?currentSchema=consent username=cms password=cms changeLogFile=src/main/resources/master.xml
-
Create the SQL upgrade script from the liquibase scripts of the new desired version by launching commands:
cd consent-management/cms-db-schema/ mvn liquibase:updateSQL
-
Apply the SQL script to the DB.
-
Ensure that SQL script was applied without any errors and DB has all previous data untouched.
-
Stop the first XS2A instance.
-
Change the image of first XS2A instance.
-
Switch off the automatic liquibase migration in the first XS2A instance by setting the configuration parameter:
spring.liquibase.enabled=false
. This parameter is stored in the application.yml. This step is required to avoid automatic DB updating. -
Launch the first instance of XS2A.
-
Repeat 6-9 for rest XS2A instances.